﻿Public Class clsDbSEquip
    Public Shared Function GetSwapStatus(ByVal szEquipID As String) As Integer

        Dim szSql As String = ""

        szSql = ""
        szSql &= "select swap_status from kad.s_equip "
        szSql &= "WHERE "
        szSql &= "  sys_equip_id = ( "
        szSql &= "  select sys_equip_id from "
        szSql &= "  kad.t_equip_reg "
        szSql &= "  where equip_id = '" & szEquipID & "' "
        szSql &= ") "
        szSql &= "limit 1 "

        Dim status As Integer = 0
        Try
            status = DBacs.ExccuteScalarSql(szSql, -1)
        Catch ex As Exception
            status = 0
        End Try

        Return status
    End Function
End Class
